﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using aspProject.Domain.Domain;
using System.Data.Entity;

namespace aspProject.Domain.DAL
{
    class LabelTypeRepository : ILabelTypeRepository
    {
        private CentricEntities context;
        private DbSet<LabelType> labelTypes;

        public LabelTypeRepository(CentricEntities context)
        {
            this.context = context;
            labelTypes = context.LabelTypes;
        }


        public IQueryable<LabelType> FindAll()
        {
            return labelTypes;
        }

        public LabelType findById(int dataConfigId)
        {
            return labelTypes.SingleOrDefault(l => l.id == dataConfigId);
        }
    }
}
